home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / GLUT-3.7 / PROGS / DEMOS / SMOOTH / GLTX.H < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-12  |  798 b   |  36 lines

  1. /*
  2.  *  Simple SGI .rgb (IRIS RGB) image file reader ripped off from
  3.  *  texture.c (written by David Blythe).  See the SIGGRAPH '96
  4.  *  Advanced OpenGL course notes.
  5.  */
  6.  
  7.  
  8. /* includes */
  9. #include <GL/glut.h>
  10.  
  11.  
  12. /* typedefs */
  13.  
  14. /* GLTXimage: Structure containing a texture image */
  15. typedef struct {
  16.   GLuint   width;            /* width of image */
  17.   GLuint   height;            /* height of image */
  18.   GLuint   components;            /* number of components in image */
  19.   GLubyte* data;            /* image data */
  20. } GLTXimage;
  21.  
  22.  
  23. /* gltxDelete: Deletes a texture image
  24.  * 
  25.  * image - properly initialized GLTXimage structure
  26.  */
  27. void
  28. gltxDelete(GLTXimage* image);
  29.  
  30. /* gltxReadRGB: Reads and returns data from an IRIS RGB image file.
  31.  *
  32.  * name       - name of the IRIS RGB file to read data from
  33.  */
  34. GLTXimage*
  35. gltxReadRGB(char *name);
  36.